<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div>
            <label>年龄</label>
           <input v-model="age" type="text" />
        </div>
        <div>当前输入的年龄是{{age}}岁</div>
        <button @click="addAge">加一岁</button>
        <button @click="alertAge">弹出年龄</button>
        <hr>
        <select v-model="course">
            <option value="java">java</option>
            <option value="html">html</option>
            <option value="css">css</option>
        </select>
        <div> 
            <input v-model="course" type="radio" name="course" value="java">java
            <input v-model="course" type="radio" name="course" value="html">html
            <input v-model="course" type="radio" name="course" value="css">css
        </div>
        <div>当前选中的课程是：{{course}}</div>
    </div>
    
</body>
<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    new Vue({
        el:"#app",
        data() {
            return {
                age: 10,
                course: "html"
            
            }
        },
        methods: {
           addAge(){
            this.age++;
           },
           alertAge(){
            alert(this.age)
           }
        },
    })
</script>

</html>